package com.hunt.web.controller;

import com.hunt.model.entity.SysUser;
import com.hunt.service.ISysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @program: hunt-lx
 * @description: test
 * @author: Lx
 * @create: 2019-01-30 22:21
 **/
@Controller
public class TestController
{
    @Autowired
    private ISysUser iSysUser;

    @GetMapping("/get")
    @ResponseBody
    public SysUser getUser()
    {
        SysUser user = iSysUser.selectByUsername("admin");
        if (user != null)
        {
            return user;
        }
        return null;
    }

    @GetMapping("/th")
    public String getTh()
    {
        return "/user/test";
    }

}
